<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            width: 150px;
            height: 150px;
            background-color: gold;
            margin: 10px;
            float: left;
        }
    </style>
    <script>
        window.onload = function () {

            var divs = document.getElementsByTagName("div");

            // 15
            for (var i = 0; i < divs.length; i++) {
                var div = divs[i];

                div.onclick = function () {
                    this.style.display = "none";
                }
            }

        }
    </script>
</head>

<body>

    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    <div>7</div>
    <div>8</div>
    <div>9</div>
    <div>10</div>
    <div>11</div>
    <div>12</div>
    <div>13</div>
    <div>14</div>
    <div>15</div>

</body>

</html>